In Ruby, What structures can a `rescue` statement be nested in
Posted
by John F. Miller
on Stack Overflow
See other posts from Stack Overflow
or by John F. Miller
Published on 2010-03-26T16:08:05Z
Indexed on
2010/03/26
17:33 UTC
Read the original article
Hit count: 297
In ruby to catch an error one uses the rescue
statement. generally this statement occurs between begin
and end
. One can also use a rescue
statement as part of a block (do ... end
) or a method (def ... end
). My question is what other structures (loop, while, if, ...) if any will rescue nest within?
© Stack Overflow or respective owner